import {BaseLinkedListModel} from "./BaseDataModel/BaseLinkedListModel.js";
import {BaseStackModel} from "./BaseDataModel/BaseStackModel.js";
import {BaseQueueModel} from "./BaseDataModel/BaseQueueModel.js";
import {BaseBinaryTreeModel} from "./BaseDataModel/BaseBinaryTreeModel.js";

//========================== 链表类型测试 ==========================
// let node1 = new BaseLinkedListModel()
// node1.addNode(1)
// node1.addNode(2)
// node1.addNode(3)
// node1.addNode(4)
// console.log(node1.hasNode(3))
// console.log(node1.deleteNode(2))
// console.log(node1.getLinkedList())

//========================== 栈类型测试 ==========================
// let stack = new Stack()
// stack.push(5)
// stack.push(5)
// stack.push(5)
// stack.push(5)
// stack.pop()
// // console.log(stack.size())
//
//
// //========================== 队列类型测试 ==========================
// let queue = new Queue()
// queue.enqueue(1);
// queue.enqueue(2);
// queue.enqueue(3);
// console.log(queue.getQueue());


//========================== 二叉树类型测试 ==========================
let binaryTree = new BaseBinaryTreeModel(5)

console.log(binaryTree.getRoot())
binaryTree.setLeft(6)
binaryTree.setLeft(7)
// binaryTree.setLeft(8)
binaryTree.setRight(9)

console.log(binaryTree.getRoot())
console.log(binaryTree.getRoot())
console.log(binaryTree.getTreeDeep())
